package db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;
import db.StuInfo.StuTable;


public class DBHelper extends SQLiteOpenHelper {

    private static final int VERSION = 1;
    //private static final String DATABASE_NAME = "studebtBase.db";

    public DBHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {

        db.execSQL("create table " + StuTable.NAME + "(" +//create table
                " _id integer primary key autoincrement, " +
                //StuTable.Cols.UUID + ", " +

                StuTable.Cols.SNUMB + ", " +
                StuTable.Cols.SNAME + ", " +
                StuTable.Cols.STEL +
                ")"
        );
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
